3.257 \(\int \cot (c+d x) \sqrt {a+a \sin (c+d x)} \, dx\)

Optimal. Leaf size=51 \[ \frac {2 \sqrt {a \sin (c+d x)+a}}{d}-\frac {2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a \sin (c+d x)+a}}{\sqrt {a}}\right )}{d} \]

[Out]

-2*arctanh((a+a*sin(d*x+c))^(1/2)/a^(1/2))*a^(1/2)/d+2*(a+a*sin(d*x+c))^(1/2)/d

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 51, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {2707, 50, 63, 207} \[ \frac {2 \sqrt {a \sin (c+d x)+a}}{d}-\frac {2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a \sin (c+d x)+a}}{\sqrt {a}}\right )}{d} \]

Antiderivative was successfully verified.

[In]

Int[Cot[c + d*x]*Sqrt[a + a*Sin[c + d*x]],x]

[Out]

(-2*Sqrt[a]*ArcTanh[Sqrt[a + a*Sin[c + d*x]]/Sqrt[a]])/d + (2*Sqrt[a + a*Sin[c + d*x]])/d

Rule 50

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^n)/(b*
(m + n + 1)), x] + Dist[(n*(b*c - a*d))/(b*(m + n + 1)), Int[(a + b*x)^m*(c + d*x)^(n - 1), x], x] /; FreeQ[{a
, b, c, d}, x] && NeQ[b*c - a*d, 0] && GtQ[n, 0] && NeQ[m + n + 1, 0] &&  !(IGtQ[m, 0] && ( !IntegerQ[n] || (G
tQ[m, 0] && LtQ[m - n, 0]))) &&  !ILtQ[m + n + 2, 0] && IntLinearQ[a, b, c, d, m, n, x]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 207

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTanh[(Rt[b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 2707

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p_.), x_Symbol] :> Dist[1/f, Subst[I
nt[(x^p*(a + x)^(m - (p + 1)/2))/(a - x)^((p + 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x]
&& EqQ[a^2 - b^2, 0] && IntegerQ[(p + 1)/2]

Rubi steps

\begin {align*} \int \cot (c+d x) \sqrt {a+a \sin (c+d x)} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {\sqrt {a+x}}{x} \, dx,x,a \sin (c+d x)\right )}{d}\\ &=\frac {2 \sqrt {a+a \sin (c+d x)}}{d}+\frac {a \operatorname {Subst}\left (\int \frac {1}{x \sqrt {a+x}} \, dx,x,a \sin (c+d x)\right )}{d}\\ &=\frac {2 \sqrt {a+a \sin (c+d x)}}{d}+\frac {(2 a) \operatorname {Subst}\left (\int \frac {1}{-a+x^2} \, dx,x,\sqrt {a+a \sin (c+d x)}\right )}{d}\\ &=-\frac {2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a+a \sin (c+d x)}}{\sqrt {a}}\right )}{d}+\frac {2 \sqrt {a+a \sin (c+d x)}}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 0.15, size = 118, normalized size = 2.31 \[ \frac {\sqrt {a (\sin (c+d x)+1)} \left (2 \sin \left (\frac {1}{2} (c+d x)\right )+2 \cos \left (\frac {1}{2} (c+d x)\right )+\log \left (-\sin \left (\frac {1}{2} (c+d x)\right )-\cos \left (\frac {1}{2} (c+d x)\right )+1\right )-\log \left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )+1\right )\right )}{d \left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )} \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[c + d*x]*Sqrt[a + a*Sin[c + d*x]],x]

[Out]

((2*Cos[(c + d*x)/2] + Log[1 - Cos[(c + d*x)/2] - Sin[(c + d*x)/2]] - Log[1 + Cos[(c + d*x)/2] + Sin[(c + d*x)
/2]] + 2*Sin[(c + d*x)/2])*Sqrt[a*(1 + Sin[c + d*x])])/(d*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2]))

________________________________________________________________________________________

fricas [A]  time = 0.50, size = 86, normalized size = 1.69 \[ \frac {\sqrt {a} \log \left (\frac {a \cos \left (d x + c\right )^{2} + 4 \, \sqrt {a \sin \left (d x + c\right ) + a} \sqrt {a} {\left (\sin \left (d x + c\right ) + 2\right )} - 8 \, a \sin \left (d x + c\right ) - 9 \, a}{\cos \left (d x + c\right )^{2} - 1}\right ) + 4 \, \sqrt {a \sin \left (d x + c\right ) + a}}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*csc(d*x+c)*(a+a*sin(d*x+c))^(1/2),x, algorithm="fricas")

[Out]

1/2*(sqrt(a)*log((a*cos(d*x + c)^2 + 4*sqrt(a*sin(d*x + c) + a)*sqrt(a)*(sin(d*x + c) + 2) - 8*a*sin(d*x + c)
- 9*a)/(cos(d*x + c)^2 - 1)) + 4*sqrt(a*sin(d*x + c) + a))/d

________________________________________________________________________________________

giac [B]  time = 2.26, size = 2182, normalized size = 42.78 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*csc(d*x+c)*(a+a*sin(d*x+c))^(1/2),x, algorithm="giac")

[Out]

-1/2*sqrt(2)*sqrt(a)*((sqrt(2)*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))*tan(1/2*c)^3*tan(1/4*c)^6 - 6*sqrt(2)*sgn(c
os(-1/4*pi + 1/2*d*x + 1/2*c))*tan(1/2*c)^3*tan(1/4*c)^5 + 3*sqrt(2)*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))*tan(1
/2*c)^2*tan(1/4*c)^6 - 15*sqrt(2)*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))*tan(1/2*c)^3*tan(1/4*c)^4 + 18*sqrt(2)*s
gn(cos(-1/4*pi + 1/2*d*x + 1/2*c))*tan(1/2*c)^2*tan(1/4*c)^5 - 3*sqrt(2)*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))*t
an(1/2*c)*tan(1/4*c)^6 + 20*sqrt(2)*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))*tan(1/2*c)^3*tan(1/4*c)^3 - 45*sqrt(2)
*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))*tan(1/2*c)^2*tan(1/4*c)^4 + 18*sqrt(2)*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c)
)*tan(1/2*c)*tan(1/4*c)^5 - sqrt(2)*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))*tan(1/4*c)^6 + 15*sqrt(2)*sgn(cos(-1/4
*pi + 1/2*d*x + 1/2*c))*tan(1/2*c)^3*tan(1/4*c)^2 - 60*sqrt(2)*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))*tan(1/2*c)^
2*tan(1/4*c)^3 + 45*sqrt(2)*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))*tan(1/2*c)*tan(1/4*c)^4 - 6*sqrt(2)*sgn(cos(-1
/4*pi + 1/2*d*x + 1/2*c))*tan(1/4*c)^5 - 6*sqrt(2)*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))*tan(1/2*c)^3*tan(1/4*c)
 + 45*sqrt(2)*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))*tan(1/2*c)^2*tan(1/4*c)^2 - 60*sqrt(2)*sgn(cos(-1/4*pi + 1/2
*d*x + 1/2*c))*tan(1/2*c)*tan(1/4*c)^3 + 15*sqrt(2)*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))*tan(1/4*c)^4 - sqrt(2)
*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))*tan(1/2*c)^3 + 18*sqrt(2)*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))*tan(1/2*c)^
2*tan(1/4*c) - 45*sqrt(2)*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))*tan(1/2*c)*tan(1/4*c)^2 + 20*sqrt(2)*sgn(cos(-1/
4*pi + 1/2*d*x + 1/2*c))*tan(1/4*c)^3 - 3*sqrt(2)*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))*tan(1/2*c)^2 + 18*sqrt(2
)*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))*tan(1/2*c)*tan(1/4*c) - 15*sqrt(2)*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))*t
an(1/4*c)^2 + 3*sqrt(2)*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))*tan(1/2*c) - 6*sqrt(2)*sgn(cos(-1/4*pi + 1/2*d*x +
 1/2*c))*tan(1/4*c) + sqrt(2)*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c)))*log(abs(2*tan(1/4*d*x + c)*tan(1/2*c)^3 - 6
*tan(1/4*d*x + c)*tan(1/2*c) + 6*tan(1/2*c)^2 - 2*(tan(1/2*c)^2 + 1)^(3/2) - 2)/abs(2*tan(1/4*d*x + c)*tan(1/2
*c)^3 - 6*tan(1/4*d*x + c)*tan(1/2*c) + 6*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*x + 1/2*c))*tan(1/4*c)^5 + 6*sqrt(2)*sgn(cos(-1/4*pi + 1
/2*d*x + 1/2*c))*tan(1/2*c)^3*tan(1/4*c) - 45*sqrt(2)*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))*tan(1/2*c)^2*tan(1/4
*c)^2 + 60*sqrt(2)*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))*tan(1/2*c)*tan(1/4*c)^3 - 15*sqrt(2)*sgn(cos(-1/4*pi +
1/2*d*x + 1/2*c))*tan(1/4*c)^4 - sqrt(2)*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))*tan(1/2*c)^3 + 18*sqrt(2)*sgn(cos
(-1/4*pi + 1/2*d*x + 1/2*c))*tan(1/2*c)^2*tan(1/4*c) - 45*sqrt(2)*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))*tan(1/2*
c)*tan(1/4*c)^2 + 20*sqrt(2)*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))*tan(1/4*c)^3 + 3*sqrt(2)*sgn(cos(-1/4*pi + 1/
2*d*x + 1/2*c))*tan(1/2*c)^2 - 18*sqrt(2)*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))*tan(1/2*c)*tan(1/4*c) + 15*sqrt(
2)*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))*tan(1/4*c)^2 + 3*sqrt(2)*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))*tan(1/2*c)
 - 6*sqrt(2)*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))*tan(1/4*c) - sqrt(2)*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c)))*log
(abs(6*tan(1/4*d*x + c)*tan(1/2*c)^2 - 2*tan(1/2*c)^3 - 2*(tan(1/2*c)^2 + 1)^(3/2) - 2*tan(1/4*d*x + c) + 6*ta
n(1/2*c))/abs(6*tan(1/4*d*x + c)*tan(1/2*c)^2 - 2*tan(1/2*c)^3 + 2*(tan(1/2*c)^2 + 1)^(3/2) - 2*tan(1/4*d*x +
c) + 6*tan(1/2*c)))/((tan(1/4*c)^6 + 3*tan(1/4*c)^4 + 3*tan(1/4*c)^2 + 1)*(tan(1/2*c)^2 + 1)^(3/2)) + 8*(sgn(c
os(-1/4*pi + 1/2*d*x + 1/2*c))*tan(1/4*d*x + c)*tan(1/4*c)^6 - 6*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))*tan(1/4*d
*x + c)*tan(1/4*c)^5 + sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))*tan(1/4*c)^6 - 15*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c
))*tan(1/4*d*x + c)*tan(1/4*c)^4 + 6*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))*tan(1/4*c)^5 + 20*sgn(cos(-1/4*pi + 1
/2*d*x + 1/2*c))*tan(1/4*d*x + c)*tan(1/4*c)^3 - 15*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))*tan(1/4*c)^4 + 15*sgn(
cos(-1/4*pi + 1/2*d*x + 1/2*c))*tan(1/4*d*x + c)*tan(1/4*c)^2 - 20*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))*tan(1/4
*c)^3 - 6*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))*tan(1/4*d*x + c)*tan(1/4*c) + 15*sgn(cos(-1/4*pi + 1/2*d*x + 1/2
*c))*tan(1/4*c)^2 - sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))*tan(1/4*d*x + c) + 6*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c
))*tan(1/4*c) - sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c)))/((sqrt(2)*tan(1/4*c)^6 + 3*sqrt(2)*tan(1/4*c)^4 + 3*sqrt(
2)*tan(1/4*c)^2 + sqrt(2))*(tan(1/4*d*x + c)^2 + 1)))/d

________________________________________________________________________________________

maple [A]  time = 0.15, size = 42, normalized size = 0.82 \[ \frac {2 \sqrt {a +a \sin \left (d x +c \right )}-2 \sqrt {a}\, \arctanh \left (\frac {\sqrt {a +a \sin \left (d x +c \right )}}{\sqrt {a}}\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)*csc(d*x+c)*(a+a*sin(d*x+c))^(1/2),x)

[Out]

1/d*(2*(a+a*sin(d*x+c))^(1/2)-2*a^(1/2)*arctanh((a+a*sin(d*x+c))^(1/2)/a^(1/2)))

________________________________________________________________________________________

maxima [A]  time = 0.41, size = 61, normalized size = 1.20 \[ \frac {\sqrt {a} \log \left (\frac {\sqrt {a \sin \left (d x + c\right ) + a} - \sqrt {a}}{\sqrt {a \sin \left (d x + c\right ) + a} + \sqrt {a}}\right ) + 2 \, \sqrt {a \sin \left (d x + c\right ) + a}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*csc(d*x+c)*(a+a*sin(d*x+c))^(1/2),x, algorithm="maxima")

[Out]

(sqrt(a)*log((sqrt(a*sin(d*x + c) + a) - sqrt(a))/(sqrt(a*sin(d*x + c) + a) + sqrt(a))) + 2*sqrt(a*sin(d*x + c
) + a))/d

________________________________________________________________________________________

mupad [B]  time = 8.73, size = 43, normalized size = 0.84 \[ \frac {2\,\sqrt {a+a\,\sin \left (c+d\,x\right )}}{d}-\frac {2\,\sqrt {a}\,\mathrm {atanh}\left (\frac {\sqrt {a+a\,\sin \left (c+d\,x\right )}}{\sqrt {a}}\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((cos(c + d*x)*(a + a*sin(c + d*x))^(1/2))/sin(c + d*x),x)

[Out]

(2*(a + a*sin(c + d*x))^(1/2))/d - (2*a^(1/2)*atanh((a + a*sin(c + d*x))^(1/2)/a^(1/2)))/d

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {a \left (\sin {\left (c + d x \right )} + 1\right )} \cos {\left (c + d x \right )} \csc {\left (c + d x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*csc(d*x+c)*(a+a*sin(d*x+c))**(1/2),x)

[Out]

Integral(sqrt(a*(sin(c + d*x) + 1))*cos(c + d*x)*csc(c + d*x), x)

________________________________________________________________________________________